Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Hit Detail Data

As described in "Hit Information Masks" , Q3Pick_GetPickDetailData returns data for specific pick detail masks. The values of the returned data for each mask are shown in Table 3 .

Table 3 Pick detail return data 

Mask

Meaning

PickID

The style pick ID in the group of the picked object. The picking ID is a 32-bit value specified by your application. See the chapter "Style Objects" for more information about picking IDs. Picking IDs are especially useful for immediate mode picking. See Listing 7 for a sample routine that uses picking IDs.

Path

The path through the model hierarchy to the picked object, from the root group of the hierarchy to the leaf object. See "Hit Path Structure" for information about a path. For immediate mode picking, this field is not valid.

Object

A reference to the picked geometry object. For immediate mode picking, this field is not valid.

LocalToWorldMatrix

The matrix that transforms the local coordinates of the picked object to world-space coordinates. This matrix is copied from the graphics state in effect at the time the object is hit. If there are multiple references to an object, this matrix may be different for each individual reference.

XYZ

For window-point picking, the point (in world-space coordinates) at which the picked object and the pick geometry intersect. For all other types of picking, this field is undefined.

Distance

For window-point picking, the distance (in world space) from the origin of the picking ray to the point of intersection with the picked object. (This is effectively the distance from the camera to the intersection point, in world space.) For all other types of picking, this field is undefined.

Normal

The surface normal of the picked object at the point of intersection with the pick geometry. This field is valid only for window-point picking.

ShapePart

The shape part object, if any, that was picked. If the picked object has no distinguishable shape parts, this field contains the value NULL . If the value of this field is not NULL , you can call the Q3ShapePart_GetType function to get the type of this shape part object, or Q3Object_GetLeafType to get the leaf type of this shape part.

Part

The object, edge, or vertex.

UV

The surface parameterization of the picked object.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |